/**
 * index 功能
 * @date 2023/9/25
 */
import { defineStore } from "pinia";
import { lightTheme } from "naive-ui";
import type { BuiltInGlobalTheme } from "naive-ui/es/themes/interface";
import type { GlobalThemeOverrides } from "naive-ui/es/config-provider/src/interface";

export const useThemeStore = defineStore("theme-store", {
  state: (): { textColor: string; naiveTheme: BuiltInGlobalTheme; naiveThemeOverrides: GlobalThemeOverrides } => {
    return {
      textColor: "#000000",
      naiveTheme: lightTheme,
      naiveThemeOverrides: {
        common: {
          borderRadius: "10px",
        },
        Dropdown: {
          optionColorHover: "#2d8cf1",
          optionTextColorHover: "#ffffff",
          optionHeightSmall: "24px",
          fontSizeSmall: "12px",
          borderRadius: "6px",
          dividerColor: "#c7c4c4",
        },

        Calendar: {
          dateColorCurrent: "red",
        },
        Notification: {
          borderRadius: "10px !important",
          color: "#eee",
          closeBorderRadius: "50%",
          textColor: "red",
        },
      },
    };
  },
  actions: {},
  persist: true,
});
